<template>
	<view class="wrap">
		<view class="search">
			<u-search v-model="keywords" @custom="search" @search="search"></u-search>
		</view>
		<scroll-view class="scroll-list" scroll-y="true">
			<view class="uni-list">
				<view class="uni-list-cell" @click="renwu">
					<uni-view class="uni-media-list">
						<view class="home-icon icon-color03">
							<i class="iconfont icon-tongzhi1"><u-badge type="error" count="2"></u-badge></i>
						</view>
						<uni-view  class="uni-media-list-body">
							<uni-view class="uni-media-list-text-top"><span>任务消息</span><span style="font-size: 26rpx;color: #999999;">12:35</span></uni-view>
							<uni-view class="uni-media-list-text-bottom">
								<uni-text><span>动物园发布了新的任务,快去领取</span></uni-text>
							</uni-view>
						</uni-view>
					</uni-view>
				</view>
				<view class="uni-list-cell" @click="xuexi">
					<uni-view class="uni-media-list">
						<view class="home-icon icon-color04">
							<i class="iconfont icon-xinwen"><u-badge type="error" count="1"></u-badge></i>
						</view>
						<uni-view  class="uni-media-list-body">
							<uni-view class="uni-media-list-text-top"><span>学习资料</span><span style="font-size: 26rpx;color: #999999;">09:07</span></uni-view>
							<uni-view class="uni-media-list-text-bottom">
								<uni-text><span>行政部门发布了新的学习资料,快去学习吧</span></uni-text>
							</uni-view>
						</uni-view>
					</uni-view>
				</view>
				<!-- <view class="uni-list-cell" @click="show"> -->
				<view class="uni-list-cell" @click="navTo('/pages/sys/workbench/add-form33')">
					<uni-view class="uni-media-list">
						<view class="home-icon icon-color06">
							<i class="iconfont icon-msg-system"></i>
						</view>
						<uni-view  class="uni-media-list-body">
							<uni-view class="uni-media-list-text-top"><span>举报线索</span><span style="font-size: 26rpx;color: #999999;">11月07日</span></uni-view>
							<uni-view class="uni-media-list-text-bottom">
								<uni-text><span>您提供的举报线索已审核通过,快去查看!</span></uni-text>
							</uni-view>
						</uni-view>
					</uni-view>
				</view>
				<uni-view class="uni-list-cell">
					<view class="uni-media-list" @click="navTo('/pages/chat-list/chat-list')">
						<view class="home-icon icon-color03">
							<i class="iconfont icon-tongzhi1"><u-badge type="error" count="0"></u-badge></i>
						</view>
						<uni-view  class="uni-media-list-body">
							<uni-view class="uni-media-list-text-top"><span>聊天记录</span><span style="font-size: 26rpx;color: #999999;">12:35</span></uni-view>
							<uni-view class="uni-media-list-text-bottom">
								<uni-text><span>您有新的聊天记录了，快去查看！</span></uni-text>
							</uni-view>
						</uni-view>
					</view>
				</uni-view>
			</view>
		</scroll-view>
	</view>
</template>
<script>
/**
 * Copyright (c) 2013-Now http://aidex.vip All rights reserved.
 */
export default {
	data() {
		return {
			keywords: '',
			role: '',	
		};
	},
	onLoad() {
		this.role = this.vuex_config.role;
	},
	methods: {
		show(){
			this.$u.toast('跳转到线索举报页面' )
		},
		renwu() {
			if(this.role == 2) {
				this.navTo('/pages/sys/workbench/add-form11')
			} else {
				this.navTo('/pages/sys/workbench/add-form116')
			}
		},
		xuexi() {
			if(this.role == 2) {
				this.navTo('/pages/sys/workbench/add-form22')
			} else {
				this.navTo('/pages/sys/workbench/add-form225')
			}
		},
		navTo(url) {
			uni.navigateTo({
				url: url
			});
		},
		search(value) {
			this.$u.toast('搜索内容为：' + value)
		}
		
	}
};

</script>
<style lang="scss">
@import '../../../common/uni.css';
page {
	background-color: #f5f5f5;
}
.wrap .search{
	background: #ffffff;
}
.uni-title{
	font-size: 30rpx;
	color: #333333;
	padding: 10px;
	background: #fff;
	border-top:1px solid #ededed;
	margin-top: 20rpx;
}
.uni-media-list {
    padding: 15px 15px;

}
.uni-media-list-body {
    height: 42px;
	padding-left:20rpx;
}
.uni-media-list-text-top{
	height: 40rpx;
    overflow: hidden;
	width: 100%;
	line-height: 40rpx;
	font-size: 32rpx;
	display: flex;
	justify-content: space-between;
}

.uni-media-list-text-bottom {
    width: 100%;
    line-height: 24rpx;
    font-size: 26rpx;
	color: #666666;
	span{
		margin-right: 10rpx;
	}
}


</style>
